<extend name="./app/Tpl/Public/template.html" />
<block name="content_body">
	<div class="pad-lr-10">
		<form name="form_search" id="form_search" action="{:U('showDialog')}" method="post">
		    <table width="100%" cellspacing="0" class="search-form">
		        <tbody>
		            <tr>
			            <td>
				            <div class="explain-col">
								<input type="text" name="title" value="{$search.title}" placeholder="供应商名称">
								<input type="text" name="content" value="{$search.content}" placeholder="产品关键字">
								<input type="text" name="product_code" value="{$search.product_code}" placeholder="商品代码">
								<input type="button"  name="form_search_btn_search"  value="查询" onclick="document.forms['form_search'].submit()"/>
								<input type="button"  name="form_search_btn_reset"  value="清空" onclick="doEmptySearch()"/>
				        	</div>
			            </td>
		            </tr>
		        </tbody>
		    </table>
	    </form>
	    <form  name="form_list" id="form_list" action="{:U('index')}" method="post">
		    <div class="table-list">		
			    <table width="100%" cellspacing="0">
			        <thead>
			            <tr>
			            	<th width="20%" align="left">供应商</th>       
			                <th width="30%" align="left">产品关键字</th>
			                <th width="15%" align="left">联系方式</th>
			                <th width="25%" align="left">详细地址</th>
			      			<th align="10%">操作</th>
			            </tr>
			        </thead>
			    	<tbody>
						<volist name="list" id='val'>
				        <tr>
				        	<td align="left">{$val.title}</td>
				            <td align="left">{$val.content}</td>
				            <td align="left">{$val.link_man},{$val.link_way}</td>
				            <td align="left">{$val.address}</td>
				            <td align="left" class="btn">
			            		<a class="link_btn" href="#" onclick="doChoose('{$val.id}','{$val.title},{$val.link_man},{$val.link_way}')" >选择</a>
				            </td>
				        </tr>
				        </volist>
			    	</tbody>
			    </table>
	    	</div>
	    </form>
	</div>
<script type="text/javascript">
function doChoose(id,content){
	var supplyer = new Object();
	supplyer.id = id;
	supplyer.content = content;
	window.opener.dealDialogSupplyer(supplyer);
	window.parent.opener=null;
	window.parent.close();	
}
function doEmptySearch(){
	document.forms['form_search'].elements['title'].value="";
	document.forms['form_search'].elements['content'].value="";
	document.forms['form_search'].elements['product_code'].value="";
}
</script>
</block>